home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / dmmde321.zip / OLDONE.QC < prev    next >
Text File  |  1996-09-04  |  10KB  |  283 lines

  1. /*
  2. ==============================================================================
  3.  
  4. OLD ONE
  5.  
  6. ==============================================================================
  7. */
  8. $cd /raid/quake/id1/models/old_one
  9. $origin 0 0 24
  10. $base base
  11. $skin skin
  12. $scale 1
  13.  
  14. void() finale_1;
  15. void() finale_2;
  16. void() finale_3;
  17. void() finale_4;
  18.  
  19.  
  20. entity    shub;
  21.  
  22. $frame old1 old2 old3 old4 old5 old6 old7 old8 old9 
  23. $frame old10 old11 old12 old13 old14 old15 old16 old17 old18 old19 
  24. $frame old20 old21 old22 old23 old24 old25 old26 old27 old28 old29 
  25. $frame old30 old31 old32 old33 old34 old35 old36 old37 old38 old39 
  26. $frame old40 old41 old42 old43 old44 old45 old46 
  27.  
  28. $frame shake1 shake2 shake3 shake4 shake5 shake6 shake7 shake8
  29. $frame shake9 shake10 shake11 shake12 shake12 shake13 shake14
  30. $frame shake15 shake16 shake17 shake18 shake19 shake20
  31.  
  32. //void() old_stand     =[      $old1,       old_stand    ] {};
  33.  
  34. void() old_idle1        =[      $old1,  old_idle2       ] {};
  35. void() old_idle2        =[      $old2,  old_idle3       ] {};
  36. void() old_idle3        =[      $old3,  old_idle4       ] {};
  37. void() old_idle4        =[      $old4,  old_idle5       ] {};
  38. void() old_idle5        =[      $old5,  old_idle6       ] {};
  39. void() old_idle6        =[      $old6,  old_idle7       ] {};
  40. void() old_idle7        =[      $old7,  old_idle8       ] {};
  41. void() old_idle8        =[      $old8,  old_idle9       ] {};
  42. void() old_idle9        =[      $old9,  old_idle10      ] {};
  43. void() old_idle10       =[      $old10, old_idle11      ] {};
  44. void() old_idle11       =[      $old11, old_idle12      ] {};
  45. void() old_idle12       =[      $old12, old_idle13      ] {};
  46. void() old_idle13       =[      $old13, old_idle14      ] {};
  47. void() old_idle14       =[      $old14, old_idle15      ] {};
  48. void() old_idle15       =[      $old15, old_idle16      ] {};
  49. void() old_idle16       =[      $old16, old_idle17      ] {};
  50. void() old_idle17       =[      $old17, old_idle18      ] {};
  51. void() old_idle18       =[      $old18, old_idle19      ] {};
  52. void() old_idle19       =[      $old19, old_idle20      ] {};
  53. void() old_idle20       =[      $old20, old_idle21      ] {};
  54. void() old_idle21       =[      $old21, old_idle22      ] {};
  55. void() old_idle22       =[      $old22, old_idle23      ] {};
  56. void() old_idle23       =[      $old23, old_idle24      ] {};
  57. void() old_idle24       =[      $old24, old_idle25      ] {};
  58. void() old_idle25       =[      $old25, old_idle26      ] {};
  59. void() old_idle26       =[      $old26, old_idle27      ] {};
  60. void() old_idle27       =[      $old27, old_idle28      ] {};
  61. void() old_idle28       =[      $old28, old_idle29      ] {};
  62. void() old_idle29       =[      $old29, old_idle30      ] {};
  63. void() old_idle30       =[      $old30, old_idle31      ] {};
  64. void() old_idle31       =[      $old31, old_idle32      ] {};
  65. void() old_idle32       =[      $old32, old_idle33      ] {};
  66. void() old_idle33       =[      $old33, old_idle34      ] {};
  67. void() old_idle34       =[      $old34, old_idle35      ] {};
  68. void() old_idle35       =[      $old35, old_idle36      ] {};
  69. void() old_idle36       =[      $old36, old_idle37      ] {};
  70. void() old_idle37       =[      $old37, old_idle38      ] {};
  71. void() old_idle38       =[      $old38, old_idle39      ] {};
  72. void() old_idle39       =[      $old39, old_idle40      ] {};
  73. void() old_idle40       =[      $old40, old_idle41      ] {};
  74. void() old_idle41       =[      $old41, old_idle42      ] {};
  75. void() old_idle42       =[      $old42, old_idle43      ] {};
  76. void() old_idle43       =[      $old43, old_idle44      ] {};
  77. void() old_idle44       =[      $old44, old_idle45      ] {};
  78. void() old_idle45       =[      $old45, old_idle46      ] {};
  79. void() old_idle46       =[      $old46, old_idle1       ] {};
  80.  
  81.  
  82. void() old_thrash1        =[ $shake1,  old_thrash2       ] {lightstyle(0, "m");};
  83. void() old_thrash2        =[      $shake2,  old_thrash3       ] {lightstyle(0, "k");};
  84. void() old_thrash3        =[      $shake3,  old_thrash4       ] {lightstyle(0, "k");};
  85. void() old_thrash4        =[      $shake4,  old_thrash5       ] {lightstyle(0, "i");};
  86. void() old_thrash5        =[      $shake5,  old_thrash6       ] {lightstyle(0, "g");};
  87. void() old_thrash6        =[      $shake6,  old_thrash7       ] {lightstyle(0, "e");};
  88. void() old_thrash7        =[      $shake7,  old_thrash8       ] {lightstyle(0, "c");};
  89. void() old_thrash8        =[      $shake8,  old_thrash9       ] {lightstyle(0, "a");};
  90. void() old_thrash9        =[      $shake9,  old_thrash10      ] {lightstyle(0, "c");};
  91. void() old_thrash10       =[      $shake10, old_thrash11      ] {lightstyle(0, "e");};
  92. void() old_thrash11       =[      $shake11, old_thrash12      ] {lightstyle(0, "g");};
  93. void() old_thrash12       =[      $shake12, old_thrash13      ] {lightstyle(0, "i");};
  94. void() old_thrash13       =[      $shake13, old_thrash14      ] {lightstyle(0, "k");};
  95. void() old_thrash14       =[      $shake14, old_thrash15      ] {lightstyle(0, "m");};
  96. void() old_thrash15       =[      $shake15, old_thrash16      ] {lightstyle(0, "m");
  97. self.cnt = self.cnt + 1;
  98. if (self.cnt != 3)
  99.     self.think = old_thrash1;
  100. };
  101. void() old_thrash16       =[      $shake16, old_thrash17      ] {lightstyle(0, "g");};
  102. void() old_thrash17       =[      $shake17, old_thrash18      ] {lightstyle(0, "c");};
  103. void() old_thrash18       =[      $shake18, old_thrash19      ] {lightstyle(0, "b");};
  104. void() old_thrash19       =[      $shake19, old_thrash20      ] {lightstyle(0, "a");};
  105. void() old_thrash20       =[      $shake20, old_thrash20      ] {finale_4();};
  106.  
  107. //============================================================================
  108.  
  109. void() finale_1 =
  110. {
  111.     local entity    pos, pl;
  112.     local entity    timer;
  113.  
  114.     intermission_exittime = time + 10000000;    // never allow exit
  115.     intermission_running = 1;
  116.  
  117.     // find the intermission spot
  118.     pos = find (world, classname, "info_intermission");
  119.     if (!pos)
  120.         error ("no info_intermission");
  121.  
  122.         if (deathmatch)
  123.         {
  124.                 NextLevel();
  125.                 return;
  126.         }
  127.  
  128.     pl = find (world, classname, "misc_teleporttrain");
  129.     if (!pl)
  130.         error ("no teleporttrain");
  131.     remove (pl);
  132.  
  133.     WriteByte (MSG_ALL, SVC_FINALE);
  134.     WriteString (MSG_ALL, "");
  135.  
  136.     pl = find (world, classname, "player");
  137.     while (pl != world)
  138.     {
  139.         pl.view_ofs = '0 0 0';
  140.         pl.angles = other.v_angle = pos.mangle;
  141.         pl.fixangle = TRUE;        // turn this way immediately
  142.         pl.map = self.map;
  143.         pl.nextthink = time + 0.5;
  144.         pl.takedamage = DAMAGE_NO;
  145.         pl.solid = SOLID_NOT;
  146.         pl.movetype = MOVETYPE_NONE;
  147.         pl.modelindex = 0;
  148.         setorigin (pl, pos.origin);
  149.         pl = find (pl, classname, "player");
  150.     }    
  151.     
  152.     // make fake versions of all players as standins, and move the real
  153.     // players to the intermission spot
  154.     
  155.     // wait for 1 second
  156.     timer = spawn();
  157.     timer.nextthink = time + 1;
  158.     timer.think = finale_2;    
  159. };
  160.  
  161. void() finale_2 =
  162. {
  163.     local vector    o;
  164.  
  165.     // start a teleport splash inside shub
  166.  
  167.     o = shub.origin - '0 100 0';
  168.     WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  169.     WriteByte (MSG_BROADCAST, TE_TELEPORT);
  170.     WriteCoord (MSG_BROADCAST, o_x);
  171.     WriteCoord (MSG_BROADCAST, o_y);
  172.     WriteCoord (MSG_BROADCAST, o_z);
  173.  
  174.     sound (shub, CHAN_VOICE, "misc/r_tele1.wav", 1, ATTN_NORM);
  175.     
  176.     self.nextthink = time + 2;
  177.     self.think = finale_3;
  178. };
  179.  
  180. void() finale_3 =
  181. {
  182.     // start shub thrashing wildly
  183.     shub.think = old_thrash1;
  184.     sound (shub, CHAN_VOICE, "boss2/death.wav", 1, ATTN_NORM);
  185.     lightstyle(0, "abcdefghijklmlkjihgfedcb");    
  186. };
  187.  
  188. void() finale_4 =
  189. {
  190.     // throw tons of meat chunks    
  191.     local    vector    oldo;
  192.     local    float    x, y, z;
  193.     local    float    r;
  194.     local entity    n;
  195.  
  196.     sound (self, CHAN_VOICE, "boss2/pop2.wav", 1, ATTN_NORM);
  197.     
  198.     oldo = self.origin;
  199.  
  200.     z = 16;
  201.     while (z <= 144)
  202.     {
  203.         x = -64;
  204.         while (x <= 64)
  205.         {
  206.             y = -64;
  207.             while (y <= 64)
  208.             {
  209.                 self.origin_x = oldo_x + x;
  210.                 self.origin_y = oldo_y + y;
  211.                 self.origin_z = oldo_z + z;
  212.  
  213.                 r = random();
  214.                 if (r < 0.3)                
  215.                     ThrowGib ("progs/gib1.mdl", -999);
  216.                 else if (r < 0.6)
  217.                     ThrowGib ("progs/gib2.mdl", -999);
  218.                 else
  219.                     ThrowGib ("progs/gib3.mdl", -999);
  220.                 y = y + 32;
  221.             }
  222.             x = x + 32;
  223.         }
  224.         z = z + 96;
  225.     }
  226.     // start the end text
  227.     WriteByte (MSG_ALL, SVC_FINALE);
  228.     WriteString (MSG_ALL, "Congratulations and well done! You have\nbeaten the hideous Shub-Niggurath, and\nher hundreds of ugly changelings and\nmonsters. You have proven that your\nskill and your cunning are greater than\nall the powers of Quake. You are the\nmaster now. Id Software salutes you.");
  229.  
  230. // put a player model down
  231.     n = spawn();
  232.     setmodel (n, "progs/player.mdl");
  233.     oldo = oldo - '32 264 0';
  234.     setorigin (n, oldo);
  235.     n.angles = '0 290 0';
  236.     n.frame = 1;
  237.  
  238.     remove (self);
  239.  
  240. // switch cd track
  241.     WriteByte (MSG_ALL, SVC_CDTRACK);
  242.     WriteByte (MSG_ALL, 3);
  243.     WriteByte (MSG_ALL, 3);
  244.     lightstyle(0, "m");    
  245. };
  246.  
  247. //============================================================================
  248.  
  249.  
  250. /*QUAKED monster_oldone (1 0 0) (-16 -16 -24) (16 16 32)
  251. */
  252. void() monster_oldone =
  253. {
  254.         if ((deathmatch) && (deathmatch < 4))
  255.     {
  256.         remove(self);
  257.         return;
  258.     }
  259.  
  260.     precache_model2 ("progs/oldone.mdl");
  261.  
  262.     precache_sound2 ("boss2/death.wav");
  263.     precache_sound2 ("boss2/idle.wav");
  264.     precache_sound2 ("boss2/sight.wav");
  265.     precache_sound2 ("boss2/pop2.wav");
  266.  
  267.     self.solid = SOLID_SLIDEBOX;
  268.     self.movetype = MOVETYPE_STEP;
  269.     
  270.     setmodel (self, "progs/oldone.mdl");
  271.     setsize (self, '-160 -128 -24', '160 128 256');
  272.  
  273.     self.health = 40000;        // kill by telefrag
  274.     self.think = old_idle1;
  275.     self.nextthink = time + 0.1;    
  276.     self.takedamage = DAMAGE_YES;
  277.     self.th_die = finale_1;
  278.     shub = self;
  279.     
  280.     total_monsters = total_monsters + 1;
  281. };
  282.  
  283.